Skip to content

401 Unauthorized" error: the session is lost just before the Session Warning modal appears.#8874

Merged
nolanpro merged 13 commits into
developfrom
bugfix/FOUR-31932
Jun 26, 2026
Merged

401 Unauthorized" error: the session is lost just before the Session Warning modal appears.#8874
nolanpro merged 13 commits into
developfrom
bugfix/FOUR-31932

Conversation

@marcoAntonioNina

@marcoAntonioNina marcoAntonioNina commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Ticket FOUR-31932

Update timeout-related variables to use Number for better type safely and introduce safe storage access methods. Enhance session renewal logic and improve error handling for BroadcastChannel creation. This ensures more robust session management and clearer code structure.

The code to extend the session and refresh the token held by the UI was also added.

Implement session renewal interceptor and enhance CSRF token management

This commit introduces a session renewal interceptor that ensures the Laravel session and CSRF token are refreshed before API requests when the session is close to expiring. It also refactors the CSRF token management in csrfToken.js to utilize globalThis for better compatibility and adds debugging logs for session renewal processes. The changes improve session management and security across the application.

ci:deploy

…y and introduce safe storage access methods. Enhance session renewal logic and improve error handling for BroadcastChannel creation. This ensures more robust session management and clearer code structure.
@Kookster310

Copy link
Copy Markdown
Contributor

QA server K8S was successfully deployed https://ci-e8ff4ec9ab.engk8s.processmaker.net

…ser clicks "STAY CONNECTED". This ensures the UI/state remains in sync without blocking the leader worker start. Improved error handling for the reload process.
@marcoAntonioNina marcoAntonioNina self-assigned this Jun 19, 2026
@Kookster310

Copy link
Copy Markdown
Contributor

QA server K8S was successfully deployed https://ci-e8ff4ec9ab.engk8s.processmaker.net

…on expiration and refresh Passport API cookie. Enhance error handling for session unavailability and return CSRF token in response.
This commit introduces a new file, csrfToken.js, which contains functions to manage CSRF tokens in the application. It includes methods to read the current CSRF token, apply it to axios requests, and attach a request interceptor to ensure the latest token is used for every request. This enhances security and ensures proper handling of CSRF tokens in client-side requests.
… applies it to future requests, ensuring improved security and synchronization of session state. Emit an event when the token is updated for better state management.
This commit reorganizes the CSRF token handling by importing utility functions for applying the CSRF token and attaching the request interceptor. It ensures that the CSRF token is consistently applied to axios requests across the application, enhancing security and session management. The code structure is improved by removing redundant lines and consolidating CSRF-related logic.
@Kookster310

Copy link
Copy Markdown
Contributor

QA server K8S was successfully deployed https://ci-e8ff4ec9ab.engk8s.processmaker.net

@Kookster310

Copy link
Copy Markdown
Contributor

QA server K8S was successfully deployed https://ci-e8ff4ec9ab.engk8s.processmaker.net

This commit introduces a session renewal interceptor that ensures the Laravel session and CSRF token are refreshed before API requests when the session is close to expiring. It also refactors the CSRF token management in `csrfToken.js` to utilize `globalThis` for better compatibility and adds debugging logs for session renewal processes. The changes improve session management and security across the application.
@Kookster310

Copy link
Copy Markdown
Contributor

QA server K8S was successfully deployed https://ci-e8ff4ec9ab.engk8s.processmaker.net

… enhancing accessibility and styling. Implement body scroll locking and focus management for improved user experience during session interactions.
@Kookster310

Copy link
Copy Markdown
Contributor

QA server K8S was successfully deployed https://ci-e8ff4ec9ab.engk8s.processmaker.net

@processmaker-sonarqube

Copy link
Copy Markdown

@Kookster310

Copy link
Copy Markdown
Contributor

QA server K8S was successfully deployed https://ci-e8ff4ec9ab.engk8s.processmaker.net

@eiresendez eiresendez self-requested a review June 26, 2026 19:23
@nolanpro nolanpro merged commit 96da327 into develop Jun 26, 2026
9 checks passed
@nolanpro nolanpro deleted the bugfix/FOUR-31932 branch June 26, 2026 21:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants